package com.user.application.command.cmd;

import com.common.aes.EncoderUtil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author 大忽悠
 * @create 2022/9/15 21:17
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class UserCommand {
    private Integer id;

    private String username;

    private String password;

    private String selfInformation;

    private MultipartFile headImgFile;

    public void setPassword(String password) {
        this.password = EncoderUtil.decodeWithPrefixOrEncode(password);
    }
}
